﻿/*
Sorayume Visual Novel Graphics Engine. v.0.2 Coded by Onix. 
Well done this time I swear to god.
*/
package
{
	import com.sorayume.visuals.SY_World;
	import flash.display.MovieClip;
	
	public class SY_DocClass extends MovieClip
	{
		var world:SY_World = null;
		private var instanceWorld:Boolean = false;
		public function SY_DocClass()
		{
			//constructor function
			/*
			For now, it looks as if DocClass takes over com.xml. It's actually testing grounds. Once xml interface is complete, functions will be managed through logics. Here only Event Listeners
			*/
			loadWorld();
		}
		
		/*Singleton methods following. To instanciate bool values must be false.*/
		public function loadWorld():*
		{
			if(instanceWorld != true)
			{
				world = new SY_World(stage.stageHeight, stage.stageWidth);
				instanceWorld = true;
			}
			else if (instanceWorld == true)
			{
				trace ("World class already instanced.");
			}
			return world;
		}
		}
		
		
}